using NodeCanvas.Framework;
using ParadoxNotion.Design;
using UnityEngine;

namespace Yoozoo.Gameplay.Liberty.AI.Node
{
    [Category("Ggame/Liberty")]
    public class SetAnimatorCrossFade : AIBaseNode
    {
        [RequiredField]
        public BBParameter<string> stateName;
        public BBParameter<float> fixedTransitionDuration = 0.2f;
        public BBParameter<int> layer = 0;
        
        protected override void OnExecute()
        {
            _animator.CrossFadeInFixedTime(stateName.value, fixedTransitionDuration.value, layer.value);
            EndAction(true);
        }
        
    }
}